Skip to content

Add --json to validate#7065

Draft
dmerand wants to merge 1 commit intodlm-json-force-no-colorfrom
dlm-app-validate-json
Draft

Add --json to validate#7065
dmerand wants to merge 1 commit intodlm-json-force-no-colorfrom
dlm-app-validate-json

Conversation

@dmerand
Copy link
Contributor

@dmerand dmerand commented Mar 20, 2026

What

Add --json to shopify app validate.

This gives the command a machine-readable mode while keeping the current text output and exit behavior unchanged.

Why

shopify app validate is useful in shell-based and agent-driven workflows, but today it only exposes human-readable output.

This PR creates a small automation foothold for validation loops and follow-up work on repair flows without changing the underlying validation model yet.

How

  • add --json / -j support to shopify app validate
  • return JSON on success and failure
  • keep the current non-zero exit behavior for invalid configs
  • leave non-JSON output unchanged

Testing

To test manually in an app project:

  1. Run shopify app validate --json in a valid app and confirm it prints a valid result object.
  2. Introduce an invalid app or extension config and run shopify app validate --json again.
  3. Confirm it prints an invalid result object and still exits non-zero.

Copy link
Contributor Author

dmerand commented Mar 20, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.2% 14945/18182
🟡 Branches 74.65% 7399/9911
🟢 Functions 81.25% 3769/4639
🟢 Lines 82.59% 14132/17111

Test suite run success

3917 tests passing in 1504 suites.

Report generated by 🧪jest coverage report action from a078db7

@dmerand dmerand force-pushed the dlm-app-validate-json branch from 59c4766 to efd8c3d Compare March 20, 2026 18:24
First pass, not final agent shape
@dmerand dmerand changed the base branch from main to graphite-base/7065 March 20, 2026 19:46
@dmerand dmerand force-pushed the graphite-base/7065 branch from a4d95bf to 91c5478 Compare March 20, 2026 19:46
@dmerand dmerand force-pushed the dlm-app-validate-json branch from efd8c3d to a078db7 Compare March 20, 2026 19:46
@dmerand dmerand changed the base branch from graphite-base/7065 to dlm-json-force-no-color March 20, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant